﻿$(function(){ 
   var x = 10; 
   var y = 20; 
   $(".l-t-a a").mouseover(function(e){ 
      this.myTitle = this.title; 
	  this.title = ""; 
      var imgTitle = this.myTitle? "<br/>" + this.myTitle : ""; 
      var tooltip = "<div id='tooltip'><img src='"+ this.href +"' alt='"+imgTitle+"'/>"+imgTitle+"<\/div>"; //创建 div 元素 
      $(".l-t-a").append(tooltip); //把它追加到文档中 
      $("#tooltip") 
      .css({ "top": (e.pageY+y) + "px", "left": (e.pageX+x) + "px" ,"color":"#ffffff","text-align":"center"}).show("fast"); //设置x坐标和y坐标，并且显
   })
   .mouseout(function(){ 
      this.title = this.myTitle; 
	  $("#tooltip").remove(); //移除 
	  })
	  
});